exports.main = (req,res) =>{
    var HTML = require(req.bind.dir+'/module/html.js');
    _GET = req.bind.__GET;
    h = new HTML();
    h.load({'title':'API || '+Math.random()*100000,js:['/public/jquery-1.12.4.min','/api/public/index']});
    //req.setEncoding('utf-8');//无效相比=  h.appHead('<meta charset="utf-8">');
    h.appHead('<meta charset="utf-8">');

    var html = '<h4>接口化处理实例</h4>';
    html += '<p>/post: 地址 http://ip/api/post</p>';
    html += postForm(h);

    h.appBody(html);
    res.write(h.getHtml());
}
function postForm(h)
{
    var html = '<form action="/api/post" method="post">';
    html += '<br><a href="javascript:void(0);" id="selfmkpost">自定义</a>post数据</span>';
    html += '<div id="smkdance"></div>'
    html += h.text([
        {type:'text',required:'required','name':'d1',placeholder:'数据','id':'post_d1'},
        {type:'submit',value:'保存'}
    ]);
    html += '</form>';
    return html;
}